import App from './App'
import Vue from 'vue'
import store from './common/store/index.js'
import {dealTel} from './common/utils/utils.js'
import lodash from 'lodash';
import uView from "uview-ui";
import empty from './components/empty/empty.vue'
import { accMul,accDiv,accAdd,accReduce,myFixed } from './common/utils/calc.js'
Vue.use(uView);


// 聊天
import TencentCloudChat  from "@tencentcloud/chat";
import TUICore from "@tencentcloud/tui-core";
// 请注意，Vue2环境下要使用Vue.use(VueCompositionAPI)  ，防止环境变量isPC等无法使用
import VueCompositionAPI from "@vue/composition-api";
Vue.use(VueCompositionAPI);
//聊天导入结束

const msg = (title, duration=2500, mask=false, icon='none')=>{
	//统一提示方便全局修改
	if(Boolean(title) === false){
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon,
	});
}
Vue.component("empty",empty)

Vue.config.productionTip = false
Vue.prototype.$lodash = lodash
Vue.prototype.$msg = msg
Vue.prototype.$dealTel=dealTel
Vue.prototype.$accMul=accMul
Vue.prototype.$accDiv=accDiv
Vue.prototype.$accAdd=accAdd
Vue.prototype.$accReduce=accReduce
Vue.prototype.$myFixed=myFixed
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
